<template>
  <view class="safe-area-inset-bottom">
    <view class="swip_header">
      <!-- <view class="slot-box">
        <view class="slot-yu">账户余额：<span style="font-weight: bold;margin-left:5rpx;">{{userInfo.balance}}</span>
          <span style="margin-left:5rpx">元</span>
        </view>
        <button size="mini" class="green_btn">立即充值</button>
      </view>
      <view class="slot-box">
        <view class="slot-yu">账户碳能量：<span style="font-weight: bold;">{{integral}}</span><span
            style="margin-left:5rpx">g</span></view>
        <button size="mini" class="green_btn" @click="exchangeDetails">兑换明细</button>
      </view>
      <view class="slot-box">
        <view class="slot-yu">合同签署量：<span style="font-weight: bold;">{{remainingNum}}</span><span
            style="margin-left:5rpx">次</span></view>
        <button size="mini" class="green_btn" @click="signList">签署明细</button>
      </view> -->
    </view>
    <!-- 签署流量包 -->
    <sign-flow-fee/>
  </view>
</template>

<script>
import signFlowFee from "@/pages/mine/personal/product/purchase/signFlowFee"
import {getProductIndex} from "@/api/ec/person/fee/product";
import {getStaffNoDept} from "@/api/ec/console/org/staff";

export default {
  components: {signFlowFee},
  data() {
    return {
      // 个人碳能量
      integral: 0,
      // 个人合同签署量
      remainingNum: 0,
      userInfo: this.$store.getters.staffInfo,
    }
  },
  onLoad() {
    // this.getCompanyInfo();
    // this.getIndex();
  },
  methods: {
    /** 签署明细 */
    signList() {
      this.$tab.navigateTo('/pages/mine/personal/evidenceOut/contractSignRecord/index')
    },
    /** 兑换明细 */
    exchangeDetails() {
      this.$tab.navigateTo('/pages/mine/signFlowFeeOrder/index')
    },
    /** 产品购买 首页账户信息 */
    getIndex() {
      getProductIndex().then(response => {
        this.integral = response.data.integral;
        this.remainingNum = response.data.remainingNum;
      });
    },
    /** 查询信息 */
    getCompanyInfo() {
      getStaffNoDept(this.userInfo.id).then(response => {
        this.userInfo = response.data;
      });
    },
  }
}
</script>
